﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace FireBillBook.DbMigrations
{
    public class DevPgsqlContextFactory : IDesignTimeDbContextFactory<DevPgSqlContext>
    {
        private const string DevConnectionString = "Host=192.168.31.172;Database=billingbook;Username=postgres;Password=1qaz@WSX3edc";

        public DevPgSqlContext CreateDbContext(string[] args)
        {
            var builder = new DbContextOptionsBuilder<DevPgSqlContext>()
                .UseNpgsql(DevConnectionString);
            return new DevPgSqlContext(builder.Options);
        }
    }
}
